/*
 * @Author: 郑堪侠
 * @Date: 2022-11-18 10:27:06
 * @LastEditTime: 2022-11-23 10:08:27
 * @FilePath: \commonTemplated:\3\安卓HTML\ganwei-app\src\main.js
 * @Description: 内容描述
 * Copyright (c) 2022 by 敢为软件, All Rights Reserved.
 */
/* eslint-disable */
import Vue from "vue";
import Element from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
import "element-ui/lib/theme-chalk/display.css";
import store from "./store";
import Axios from "axios";
import App from "./App";
import router from "./router";
import myUtils from "./utils/myUtils";
import api from "./request/api";
import getCode from "./assets/plugins/encrypt";
// import Echarts from 'echarts'
import appFrame from "@/components/v-appFrame/v-appFrame.js";
import "../static/theme/index.css";
import "../static/css/reset.scss";
import "@assets/styles/style.scss";
import loadMore from "./components/loadMore/loadMore";
import "../static/font/iconfont.css";
import loading from "./components/loading";
import toast from "./components/toast";

const Echarts = equire(["line", "tooltip"]);

import moment from "dayjs";

//中英文切换
import VueI18n from "vue-i18n";
import zh from "./components/language/zh-cn/zh";
import en from "./components/language/en-us/en";
Vue.use(VueI18n);
import ElementLocale from "element-ui/lib/locale";
const i18n = new VueI18n({
    locale: sessionStorage.languageSet,
    messages: {
        zh: zh,
        en: en
    },
    silentTranslationWarn: true //去掉控制台i18n warning
});
ElementLocale.i18n((key, value) => i18n.t(key, value));

export default i18n;
Vue.use(loadMore);
Vue.use(Element);
Vue.use(loading);

const bus = new Vue();

Vue.use(appFrame);
Vue.config.productionTip = false;
Vue.prototype.Axios = Axios;
Vue.prototype.$Store = store;
Vue.prototype.$echart = Echarts;
Vue.prototype.$moment = moment;
Vue.prototype.$message = toast;

/* 将 getCode 挂载到 vue 的原型上 */
Vue.prototype.$getCode = getCode;

/* 将 myUtils 挂载到 vue 的原型上 */
Vue.prototype.myUtils = myUtils;

/* 将api 挂载到 vue 的原型上 */
Vue.prototype.$api = api;

window.vm = new Vue({
    router,
    store,
    i18n,
    render: h => h(App),
    data: {
        bus
    }
}).$mount("#app");